/**
 * @file   colorConfig.h
 * @author wolfhead <wolfhead@wolfhead-laptop>
 * @date   Mon Dec  5 20:27:43 2011
 * 
 * @brief  
 * 
 * 
 */
#ifndef ACAPELLA_COLORLINE_COLOR_CONFIG_H
#define ACAPELLA_COLORLINE_COLOR_CONFIG_H

#include <map>
#include <vector>
#include <string>

class ColorRule;

class ColorConfig
{
public:
    ColorConfig();
    ~ColorConfig();

    int RegisterColor(const std::string& name, const std::string& color);
    std::string GetColor(const std::string& name) const;

    int LoadConfig(const std::string& config);

    std::string ParseLine(const std::string& line);

    const std::string& GetDefaultColor() const;

private:
    
    std::string _GetColor(const std::string& color) const;

    std::map<std::string/*name*/, std::string/*color*/> colors_; 
    std::vector<ColorRule*> rules_;
};

#endif
